package com.gzhryc.shared_device.cdcz.code.dao.db;

import java.util.Date;

import com.gzhryc.jdbc.annotaion.Column;
import com.gzhryc.jdbc.annotaion.Id;
import com.gzhryc.jdbc.annotaion.Table;
import com.gzhryc.shared_device.cdcz.code.dao.enums.ChargeSocketSlaveDeviceEnum;

/**
 * 共享充电插座从机
 * @version 2023-06-03
 */
@Table(name = "dev_charge_socket_slave_device")
public class ChargeSocketSlaveDevice {

    @Id(auto = false)
    @Column(name = "device_sn", notNull = true)
    protected String deviceSn;

    @Column(name = "main_device_sn")
    protected String mainDeviceSn;

    @Column(name = "bind_index", notNull = true, defVal = "1", note = "绑定序号")
    protected Integer bindIndex;

    @Column(name = "slot_total", notNull = true, defVal = "1", note = "卡槽数")
    protected Integer slotTotal;

    @Column(notNull = true, defVal = "1", note = "状态")
    protected Integer state;

    @Column(name = "bind_date",note = "绑定时间")
    protected Date bindDate;

    @Column(name = "update_date", autoUpdateTime = true, note = "最后修改时间")
    protected Date updateDate;

    @Column(name = "create_date")
    protected Date createDate;

    public String getDeviceSn() {
        return deviceSn;
    }

    public void setDeviceSn(String deviceSn) {
        this.deviceSn = deviceSn;
    }

    public String getMainDeviceSn() {
        return mainDeviceSn;
    }

    public void setMainDeviceSn(String mainDeviceSn) {
        this.mainDeviceSn = mainDeviceSn;
    }

    public Integer getBindIndex() {
        return bindIndex;
    }

    public void setBindIndex(Integer bindIndex) {
        this.bindIndex = bindIndex;
    }

    public Integer getSlotTotal() {
        return slotTotal;
    }

    public void setSlotTotal(Integer slotTotal) {
        this.slotTotal = slotTotal;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Date getBindDate() {
        return bindDate;
    }

    public void setBindDate(Date bindDate) {
        this.bindDate = bindDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getStateName(){
        return ChargeSocketSlaveDeviceEnum.State.note(this.state);
    }
}
